<template>
  <div>
    <h2>为了方便匿名测试的进入通道</h2>
    <el-button
      ref="enter"
      class="logon-button"
      type="primary"
      @click="accountSubmit()"
      >匿名登录
    </el-button>
  </div>
</template>

<script>
// import New from './components/New.vue';
import { content, staticViews } from "@/router";

export default {
  name: "DevLogon",
  components: {
    // New,Old,
  },
  props: {
    sampleP: {
      type: Number,
      default: 0,
    },
  },
  data() {
    return {
      sampleD: "value",
    };
  },
  computed: {
    // sampleC() {
    //     return this.sampleD+'--';
    // }
  },
  created() {},
  mounted() {
    // this.$refs.enter.focus();

  },
  methods: {
    sampleM() {},
    accountSubmit() {
      //修改getAll
      this.$store.dispatch("appInit",true).then(() => {
        this.$nextTick(() => {
          this.$router.push("/content");
        });
      });

      // this.$store.dispatch("getRoutesAll").then(() => {
      //   this.$notify.warning(
      //     "正在添加动态路由..." + this.$store.state.routesForRouter
      //   );
      //   // this.$store.state.routesForRouter.forEach(x=>{
      //   //   this.$router.addRoute("Content",x)
      //   // })
      //   console.log("static", staticViews);
      //   console.log("dynamic", this.$store.state.routesForRouter);
      //   //动静合并
      //   content.children = staticViews.concat(
      //     this.$store.state.routesForRouter
      //   );
      //   this.$router.addRoute(content);
      //   console.log("=========所有路由 ", this.$router.getRoutes());
      // });
      // this.$store.dispatch("getLeaveTypeEnums");
      // this.$store.dispatch("getApplyStateEnums");
      // this.$store.dispatch("getAuditStateEnums");

      //最后一步 跳转页面
    },
  },
  watch: {
    // sampleC(newValue, oldValue) {
    //
    // }
  },
};
</script>

<!--<style scoped>-->
<style lang="scss" scoped></style>
